<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>登录</title>
    <!--    <link rel="stylesheet" href="__STATIC__/admin/css/login.css">-->
    <link rel="stylesheet" href="__STATIC__/admin/css/login.css">
    <!-- 作者QQ:951252660 -->
</head>
<body>
<div class="login">
    <div class="center">
        <h1>Login</h1>
        <form action="/admins/admins/dologin" method="post" enctype="multipart/form-data">
            {:token()}
            <div class="inputLi">
                <strong>账户</strong>
                <input type="text" placeholder="手机号/邮箱/账号登录..." name="a_name" id="username" value="">
            </div>
            <div class="inputLi">
                <strong>密码</strong>
                <input type="password" placeholder="请输入密码" name="password" id="password">
            </div>

            <div class="inputLi">
                <button id="login">登录</button>
            </div>
        </form>
    </div>
</div>
</body>
</html>
<!--<script src="__STATIC__/admin/js/jquery-3.1.1.min.js"></script>-->
<!--<script>-->
<!--    $('#login').click(function () {-->
<!--        var username = $('#username').val();-->
<!--        var password = $('#password').val();-->
<!--        $.ajax({-->
<!--            "url": "http://www.admin.com/home/home/dologin",//入口 生成token-->
<!--            "type": "POST",-->
<!--            "data": {-->
<!--                'username': username,-->
<!--                'password': password,-->
<!--                '__token__': "{$Request.token}",//表单令牌  表单重复提交，防止接口刷新-->
<!--            },-->
<!--            "dataType": "JSON",-->
<!--            "success": function (res) {-->
<!--                console.log(res);-->
<!--                // if (res.code == 200) {-->
<!--                //     alert('登录成功');-->
<!--                //     //存储本地缓存-->
<!--                //     localStorage.setItem('token', res.data.token);-->
<!--                // }-->
<!--            },-->
<!--            "error": function (error) {-->
<!--                console.log(error);-->
<!--            },-->
<!--        })-->
<!--    })-->
<!--</script>-->